import VueRouter from "vue-router";

export default new VueRouter({
    routes:[
        {
            path: '/',
            component: ()=>import("@/views/Main.vue"),
            redirect: '/home',
            children: [
                {
                    path: 'home',
                    component: ()=>import('@/views/home/index.vue')
                },
                {
                    path: 'library',
                    component: ()=>import('@/views/library/index.vue'),
                },
                {
                    path: '/library/list',
                    component: ()=>import('@/views/library/list.vue')
                },
                {
                    path: '/library/overview',
                    component: ()=>import('@/views/library/overview.vue')
                },
                {
                    path: '/library/detail',
                    component: ()=>import("@/views/library/detail.vue")
                },
                {
                    path: '/onlineWrite',
                    component: () =>import('@/views/onlineWrite/index.vue')
                },
                {
                    path: '/manual',
                    component: ()=>import('@/views/manual/index.vue')
                },
                {
                    path: '/buildWeb',
                    component: ()=>import('@/views/buildWeb/index.vue')
                }
            ]
        },
        {
            path: '/login',
            component: ()=> import('@/views/login/login.vue')
        }
    ]
})